﻿using System;
using System.Data;
using System.Collections;
using CE.Database;

/// <summary>
/// Summary description for UserSummaryDB
/// </summary>
/// 
namespace CE.User
{
    public class UserSummaryDB
    {
        public UserSummaryDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public DataSet GetUserSummaryCount(string SummaryType, Int16 ReportType, string ReportDate1, string ReportDate2)
        {
            MyDatabase _db = new MyDatabase();
            string _spName = "[sprocUserSummaryCountReportSelectedList]";
            SortedList _sPara = new SortedList();

            _sPara.Add("@SummaryType", SummaryType);
            _sPara.Add("@ReportType", ReportType);
            _sPara.Add("@ReportDate1", ReportDate1);
            _sPara.Add("@ReportDate2", ReportDate2);

            return _db.GetDataSet(_spName, _sPara);
        }

        public DataSet GetUserQuotesCount(Int64 UserId)
        {
            MyDatabase _db = new MyDatabase();
            string _spName = "[sprocCXTHQuotesCountSelectItemListByUserId]";
            SortedList _sPara = new SortedList();

            _sPara.Add("@RefCEUserId", UserId);

            return _db.GetDataSet(_spName, _sPara);
        }

        public DataSet GetProposalCount(Int64 UserId)
        {
            MyDatabase _db = new MyDatabase();
            string _spName = "[sprocCXTHProposalCountSelectItemListByUserId]";
            SortedList _sPara = new SortedList();

            _sPara.Add("@RefCEUserId", UserId);

            return _db.GetDataSet(_spName, _sPara);
        }

        public DataSet GetUserResultCount(Int16 ReportType, string ReportDate1, string ReportDate2)
        {
            MyDatabase _db = new MyDatabase();
            string _spName = "[sprocCXTHUserResultCountReportSelectedList]";
            SortedList _sPara = new SortedList();

            _sPara.Add("@ReportType", ReportType);
            _sPara.Add("@ReportDate1", ReportDate1);
            _sPara.Add("@ReportDate2", ReportDate2);

            return _db.GetDataSet(_spName, _sPara);
        }

    }
}